<template>
	<view class="goods" @click="navto('/pages/goods/details')">
		<image :src="item.pic" class="goods__pic" mode="aspectFill"></image>
		<view class="goods__info">
			<view class="goods__name u-line-2">
				{{item.name}}
			</view>
			<view class="u-flex u-flex-y-center u-flex-between">
				<view class="u-flex u-flex-y-center">
					<view class="goods__price">
						{{item.price}}
					</view>
					<view class="goods__oldprice">
						￥{{item.oldprice}}
					</view>
				</view>
				
				<image src="/static/my/carbtn.png" class="goods__car" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"goods",
		props:{
			item:{
				type:Object,
				default:{}
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">
.goods{
	width: 340rpx;
	background: #D9D9D9;
	border-radius: 30rpx;
	overflow: hidden;
	margin-bottom: 26rpx;
	&__pic{
		width: 340rpx;
		height: 340rpx;
	}
	&__info{
		padding: 15rpx;
		background-color: #ffffff;
		margin-top: -4px;
		
	}
	&__name{
		width: 310rpx;
		font-family: PingFang;
		font-weight: 800;
		font-size: 28rpx;
		color: #181818;
		line-height: 36rpx;
		margin-bottom: 10rpx;
	}
	&__price{
		font-family: PingFang;
		font-weight: bold;
		font-size: 36rpx;
		color: #F54D42;
		line-height: 30rpx;
		&::before{
			content: "￥";
			font-size: 30rpx;
		}
	}
	&__oldprice{
		font-family: PingFang;
		font-weight: 500;
		font-size: 22rpx;
		color: #919191;
		line-height: 30rpx;
		margin-top: 4rpx;
	}
	&__car{
		width: 52rpx;
		height: 52rpx;
	}
}
</style>